﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BUGCOME.Model.File
{
    /// <summary>
    /// 会员专属文件配置表
    /// </summary>
    [Table("fileMember")]
    [Tenant("5")]
    public class FileMember
    {
        /// <summary>
        /// 文件ID（关联fileBase.Id）
        /// </summary>
        [Key]
        public long FileId { get; set; }

        /// <summary>
        /// 所需会员等级（1=蛹化，2=羽化，3=拟态，4=虫子）
        /// </summary>
        public int RequiredMemberLevel { get; set; }

        /// <summary>
        /// 会员免费下载次数
        /// </summary>
        public int FreeDownloadCount { get; set; } = 0;

        // 导航属性
        [SugarColumn(IsIgnore = true)]
        [ExcelIgnore]
        public FileBase FileBase { get; set; }
    }
}
